{literal}
<script type="text/javascript">
<!--
$(function(){
	jQuery.validator.addMethod("zenkaku", function(value, element) {
	  return this.optional(element) || /^[ 　]*[^ -~｡-ﾟ]*[ 　]*$/i.test(value);
	});
	jQuery.validator.addMethod("furikana", function(value, element) {
	  return this.optional(element) || /^[ァ-ヾ]+$/i.test(value);
	});
	jQuery.validator.addMethod("numhifun", function(value, element) {
	  return this.optional(element) ||  /[0-9\-]/i.test(value);
	});
	$("#asnform").validate({
		groups: {
			address : "Zip1 Zip2 PrefCd Address1 Address2",
			inq : "Inquiry1 Inquiry2 Inquiry3"
		},
		rules: {
			Inquiry1 :{
				required: function() { return !((($("#Inquiry1").attr("checked")) || ($("#Inquiry2").attr("checked")) || ($("#Inquiry3").attr("checked")))); }
			},
			Inquiry2 :{
				required: function() { return !((($("#Inquiry1").attr("checked")) || ($("#Inquiry2").attr("checked")) || ($("#Inquiry3").attr("checked")))); }
			},
			Inquiry3 :{
				required: function() { return !((($("#Inquiry1").attr("checked")) || ($("#Inquiry2").attr("checked")) || ($("#Inquiry3").attr("checked")))); }
			},
			Zip1 :{
				required: function() { return !(($("#Zip1").val() != "") && ($("#Zip2").val() != "")  && ($("#PrefCd").val() != "")  && ($("#Address1").val() != "") && ($("#Address2").val() != "")); }
			},
			Zip2 :{
				required: function() { return !(($("#Zip1").val() != "") && ($("#Zip2").val() != "")  && ($("#PrefCd").val() != "")  && ($("#Address1").val() != "") && ($("#Address2").val() != "")); }
			},
			PrefCd :{
				required: function() { return !(($("#Zip1").val() != "") && ($("#Zip2").val() != "")  && ($("#PrefCd").val() != "")  && ($("#Address1").val() != "") && ($("#Address2").val() != "")); }
			},
			Address1 :{
				required: function() { return !(($("#Zip1").val() != "") && ($("#Zip2").val() != "")  && ($("#PrefCd").val() != "")  && ($("#Address1").val() != "") && ($("#Address2").val() != "")); }
			},
			Address2 :{
				required: function() { return !(($("#Zip1").val() != "") && ($("#Zip2").val() != "")  && ($("#PrefCd").val() != "")  && ($("#Address1").val() != "") && ($("#Address2").val() != "")); }
			}
		},
		messages: {
			Company :{
				required: "※貴社名のご入力をお願いいたします。"
			},
			Zip1 :{
				required: "※郵便番号のご入力をお願いいたします。",
				number: "※郵便番号は半角数字でのご入力をお願いいたします。"
			},
			Zip2 :{
				required: "※郵便番号のご入力をお願いいたします。",
				number: "※郵便番号は半角数字でのご入力をお願いいたします。"
			},
			PrefCd :{
				required: "※都道府県のご入力をお願いいたします。"
			},
			Address1 :{
				required: "※市区町村のご入力をお願いいたします。"
			},
			Address2 :{
				required: "※町名以下のご入力をお願いいたします。"
			},
			Busho :{
				required: "※部署名のご入力をお願いいたします。"
			},
			ChargeNm :{
				required: "※担当者名（お名前）のご入力をお願いいたします。",
				zenkaku: "※担当者名（お名前）は全角にてご入力をお願いいたします。"
			},
			ChargeNmKana :{
				required: "※担当者名（フリガナ）のご入力をお願いいたします。",
				furikana: "※担当者名（フリガナ）は全角カナにてご入力をお願いいたします。"
			},
			Tel :{
				required: "※お電話番号のご入力をお願いいたします。",
				numhifun: "※お電話番号は数字とハイフン（-）にてご入力をお願いいたします。"
			},
			Fax :{
				numhifun: "※お電話番号は数字とハイフン（-）にてご入力をお願いいたします。"
			},
			Mail :{
				email: "※メールアドレスの形式エラーです。"
			},
			Inquiry1 :{
				required: "※お問い合わせ内容のチェックをお願いいたします。"
			},
			Inquiry2 :{
				required: "※お問い合わせ内容のチェックをお願いいたします。"
			},
			Inquiry3 :{
				required: "※お問い合わせ内容のチェックをお願いいたします。"
			},
			Comment :{
				maxlength: "※500文字以内でご記入をお願いいたします。"
			}
		},
		errorElement: "p",
		errorClass: "errTxt"
	});
})
	//ASN法人お問合せ確認画面へ遷移
	function corporateEntrySubmit(){
		if($("#asnform").valid()){
			//submit
			var fm = document.getElementById("asnform");
			//都道府県
			if(document.getElementById("PrefCd").value == "00"){
				document.getElementById("PrefName").value = "都道府県未選択";
			}else if(document.getElementById("PrefCd").value == "01"){
				document.getElementById("PrefName").value = "北海道";
			}else if(document.getElementById("PrefCd").value == "02"){
				document.getElementById("PrefName").value = "青森県";
			}else if(document.getElementById("PrefCd").value == "03"){
				document.getElementById("PrefName").value = "岩手県";
			}else if(document.getElementById("PrefCd").value == "04"){
				document.getElementById("PrefName").value = "宮城県";
			}else if(document.getElementById("PrefCd").value == "05"){
				document.getElementById("PrefName").value = "秋田県";
			}else if(document.getElementById("PrefCd").value == "06"){
				document.getElementById("PrefName").value = "山形県";
			}else if(document.getElementById("PrefCd").value == "07"){
				document.getElementById("PrefName").value = "福島県";
			}else if(document.getElementById("PrefCd").value == "08"){
				document.getElementById("PrefName").value = "茨城県";
			}else if(document.getElementById("PrefCd").value == "09"){
				document.getElementById("PrefName").value = "栃木県";
			}else if(document.getElementById("PrefCd").value == "10"){
				document.getElementById("PrefName").value = "群馬県";

			}else if(document.getElementById("PrefCd").value == "11"){
				document.getElementById("PrefName").value = "埼玉県";
			}else if(document.getElementById("PrefCd").value == "12"){
				document.getElementById("PrefName").value = "千葉県";
			}else if(document.getElementById("PrefCd").value == "13"){
				document.getElementById("PrefName").value = "東京都";
			}else if(document.getElementById("PrefCd").value == "14"){
				document.getElementById("PrefName").value = "神奈川県";
			}else if(document.getElementById("PrefCd").value == "15"){
				document.getElementById("PrefName").value = "新潟県";
			}else if(document.getElementById("PrefCd").value == "16"){
				document.getElementById("PrefName").value = "富山県";
			}else if(document.getElementById("PrefCd").value == "17"){
				document.getElementById("PrefName").value = "石川県";
			}else if(document.getElementById("PrefCd").value == "18"){
				document.getElementById("PrefName").value = "福井県";
			}else if(document.getElementById("PrefCd").value == "19"){
				document.getElementById("PrefName").value = "山梨県";
			}else if(document.getElementById("PrefCd").value == "20"){
				document.getElementById("PrefName").value = "長野県";

			}else if(document.getElementById("PrefCd").value == "21"){
				document.getElementById("PrefName").value = "岐阜県";
			}else if(document.getElementById("PrefCd").value == "22"){
				document.getElementById("PrefName").value = "静岡県";
			}else if(document.getElementById("PrefCd").value == "23"){
				document.getElementById("PrefName").value = "愛知県";
			}else if(document.getElementById("PrefCd").value == "24"){
				document.getElementById("PrefName").value = "三重県";
			}else if(document.getElementById("PrefCd").value == "25"){
				document.getElementById("PrefName").value = "滋賀県";
			}else if(document.getElementById("PrefCd").value == "26"){
				document.getElementById("PrefName").value = "京都府";
			}else if(document.getElementById("PrefCd").value == "27"){
				document.getElementById("PrefName").value = "大阪府";
			}else if(document.getElementById("PrefCd").value == "28"){
				document.getElementById("PrefName").value = "兵庫県";
			}else if(document.getElementById("PrefCd").value == "29"){
				document.getElementById("PrefName").value = "奈良県";
			}else if(document.getElementById("PrefCd").value == "30"){
				document.getElementById("PrefName").value = "和歌山県";

			}else if(document.getElementById("PrefCd").value == "31"){
				document.getElementById("PrefName").value = "鳥取県";
			}else if(document.getElementById("PrefCd").value == "32"){
				document.getElementById("PrefName").value = "島根県";
			}else if(document.getElementById("PrefCd").value == "33"){
				document.getElementById("PrefName").value = "岡山県";
			}else if(document.getElementById("PrefCd").value == "34"){
				document.getElementById("PrefName").value = "広島県";
			}else if(document.getElementById("PrefCd").value == "35"){
				document.getElementById("PrefName").value = "山口県";
			}else if(document.getElementById("PrefCd").value == "36"){
				document.getElementById("PrefName").value = "徳島県";
			}else if(document.getElementById("PrefCd").value == "37"){
				document.getElementById("PrefName").value = "香川県";
			}else if(document.getElementById("PrefCd").value == "38"){
				document.getElementById("PrefName").value = "愛媛県";
			}else if(document.getElementById("PrefCd").value == "39"){
				document.getElementById("PrefName").value = "高知県";
			}else if(document.getElementById("PrefCd").value == "40"){
				document.getElementById("PrefName").value = "福岡県";

			}else if(document.getElementById("PrefCd").value == "41"){
				document.getElementById("PrefName").value = "佐賀県";
			}else if(document.getElementById("PrefCd").value == "42"){
				document.getElementById("PrefName").value = "長崎県";
			}else if(document.getElementById("PrefCd").value == "43"){
				document.getElementById("PrefName").value = "熊本県";
			}else if(document.getElementById("PrefCd").value == "44"){
				document.getElementById("PrefName").value = "大分県";
			}else if(document.getElementById("PrefCd").value == "45"){
				document.getElementById("PrefName").value = "宮崎県";
			}else if(document.getElementById("PrefCd").value == "46"){
				document.getElementById("PrefName").value = "鹿児島県";
			}else if(document.getElementById("PrefCd").value == "47"){
				document.getElementById("PrefName").value = "沖縄県";
			}
			fm.action = '{/literal}{$sslurl}{literal}inquiry/corporatecnf/';
			fm.submit();
		}
	}
	//ASN法人お問合せ完了画面へ遷移
	function corporateCnfSubmit(){
		var fm = document.getElementById("asnform");
		fm.action = '{/literal}{$sslurl}{literal}inquiry/corporatesend/';
		fm.submit();
	}
	//ASN法人お問合せ確認画面からASN法人お問合せ入力画面へ遷移
	function corporateBackToEntry(){
		var fm = document.getElementById("asnform");
		fm.action = '/inquiry/corporateentry/';
		fm.submit();
	}
-->
</script>
{/literal}

